home *** CD-ROM | disk | FTP | other *** search
- ' This simple macro outputs the layer name of each layer a line is on
- ' and the endpoints of that line to an ASCII text file.
- '
- ' Dimension Array to hold Point Values
- Dim ax(4), ay(4), az(4)
- ' Open Output file
- Open "o", 1, "*\airfoil.dat"
- ' Loop through entire Drawing
- for a = 1 to Sys(9)
- ' Check to see if entities are lines
- getattr a, type
- if type = 1 then
- ' Select Current Entity
- Entity a
- ' Get Layer of Entity
- LayNum = Sys(93)
- ' Switch to that Layer
- Sys(3) = LayNum
- ' Get Current Layer Name
- LayName$ = Sys$(93)
- ' Loop for points set
- for b = 1 to Sys(1)
- ' Get Point Values
- pointval ax(b) ay(b) az(b) b
- ' Construct Output String
- test$ = LayName$," ",ax(b)," ",ay(b)," ",az(b)
- print #1, test$
- next b
- endif
- next a
- ' Close the File
- Close #1
- ' Done
- End
-
-